{include file="public/header" /}
<article class="page-container">
    <form action="" method="post" class="form form-horizontal" enctype="multipart/form-data" id="form-add">
        <div class="row cl" style="width: 100%">
            <label class="form-label col-xs-5 col-sm-5"><span class="c-red">*</span>订单号：</label>
            <div class="formControls col-xs-5 col-sm-5">
                <input type="text" class="input-text" value="{$data.sn|default=''}" placeholder="" id="sn" name="sn" readonly>
            </div>
        </div>
        <div class="row cl" style="width: 100%">
            <label class="form-label col-xs-5 col-sm-5"><span class="c-red">*</span>匹配类型：</label>
            <div class="formControls col-xs-5 col-sm-5">
                <select name="matcher" class="select">
                    <option value="1"  selected>匹配虚拟用户</option>
                    <option value="2" >匹配正常用户</option>
                </select>
            </div>
        </div>
        <div class="row cl" style="width: 100%">
            <label class="form-label col-xs-5 col-sm-5"><span class="c-red">*</span>用户手机号：</label>
            <div class="formControls col-xs-5 col-sm-5">
                <input type="text" class="input-text" value="" placeholder="请输入需要匹配的手机号" id="mobile" name="mobile">
            </div>
        </div>

        <div class="row cl"  style="width: 100%">
            <label class="form-label col-xs-5 col-sm-5"><span class="c-red">*</span>二级密码：</label>
            <div class="formControls col-xs-5 col-sm-5">
                <input type="password" class="input-text"  placeholder="" id="level_pass" name="level_pass" autocomplete="off">
            </div>
        </div>

        <div class="row cl" >
            <div class="col-xs-10 col-sm-10" style="width: 100%;text-align: center">
                <input type="hidden" value="{$data.id|default=''}" name="id">
                <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
            </div>
        </div>
    </form>
</article>


{include file="public/footer" /}
<script type="text/javascript">
    $(function(){

        $("#form-add").validate({
            rules:{

            },
            onkeyup:false,
            focusCleanup:true,
            success:"valid",
            submitHandler:function(form){
                $(form).ajaxSubmit({
                    success:function(data){
                        console.log(data);
                        if(data.status == 0){
                            layer.msg("操作成功",{icon:1,time:1000,shade: [0.3, '#000']},function(){
                                var index = parent.layer.getFrameIndex(window.name);
                                parent.location.reload();
                                parent.layer.close(index);
                            });
                        }else{
                            layer.msg(data.info,{icon:2,time:1000,shade: [0.3, '#000']});
                        }
                    },
                    error:function(error){
                        layer.msg('系统发生了错误',{icon:2,time:3000,shade: [0.5, '#FF0000']});
                    }
                });
            }
        });
    });
</script>
